﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LanguageInfo.Common.Enum;

namespace LanguageInfo.Common.Config
{
	[Serializable]
	public class Setting
	{
		/// <summary>
		/// Session或Cookie的过期时间，单位分钟
		/// </summary>
		public int SessionTimeout { get; set; }

		/// <summary>
		/// 下载文件保留的时间
		/// </summary>
		public int DownloadFileKeepTime { get; set; }

		/// <summary>
		/// 缓存依赖文件的路径
		/// </summary>
		public string CacheDependPath { get; set; }

		/// <summary>
		/// 网站版本
		/// </summary>
		public int SiteEdtion { get; set; }

		/// <summary>
		/// 网站语言 1=中文, 2=英文, 0=通用
		/// </summary>
		public int SiteLanguage { get; set; }

        /// <summary>
        /// 应用程序ID, 1=电信, 2=网通, 3=教育网
        /// </summary>
        public int AppId { get; set; }

		/// <summary>
		/// 登录失败的次数，超过此次数显示验证码
		/// </summary>
		public int LoginFailureTimes { get; set; }

		/// <summary>
		/// 用于密码加密的密钥
		/// </summary>
		public string SecurityKey { get; set; }

		/// <summary>
		/// 匿名账号名
		/// </summary>
		public string DemoAcctName { get; set; }

		/// <summary>
		/// 匿名账号密码
		/// </summary>
		public string DemoPassword { get; set; }

		/// <summary>
		/// 试用账号名
		/// </summary>
		public string TryoutAcctName { get; set; }

		/// <summary>
		/// 样本数据年限设置，逗号间隔开的两个时间值
		/// </summary>
		public string SampleDataCondition { get; set; }


		/// <summary>
		/// 动态生成的文件路径，主要是js文件(JSON)
		/// </summary>
		public string GeneratedFileUrl { get; set; }

		/// <summary>
		/// 邮箱模板路径
		/// </summary>
		public string EmailTemplateUrl { get; set; }

		/// <summary>
		/// 所有树用户控件的Url
		/// </summary>
		public string TreeFileUrl { get; set; }

		/// <summary>
		/// 查询结果临时保存的Url，文件名为:{用户名}_data.config
		/// </summary>
		public string TempDataUrl { get; set; }

		/// <summary>
		/// 区别前台还/后台/服务
		/// </summary>
		public string AppName { get; set; }

		/// <summary>
		/// 样本数据保存的Url，文件名为: {nodeid}.config
		/// </summary>
		public string SampleDataUrl { get; set; }

		/// <summary>
		/// 在线用户的服务地址，通过此地址获取当前用户的信息
		/// </summary>
		public string OnlineServiceUrl { get; set; }

		/// <summary>
		/// 自定义查询导出数据临时目录
		/// </summary>
		public string ExportTempUrl { get; set; }

		/// <summary>
		/// 绘图数据临时目录
		/// </summary>
		public string TempImagesUrl { get; set; }

		/// <summary>
		/// 单表查询导出数据时时目录
		/// </summary>
		public string SQExportTempUrl { get; set; }

		/// <summary>
		/// Webui项目的物理目录
		/// </summary>
		public string WebuiPath { get; set; }

		/// <summary>
		/// Admin项目的物理录
		/// </summary>
		public string AdminuiPath { get; set; }

		/// <summary>
		/// CSMARService的物理目录
		/// </summary>
		public string CSMARServicePath { get; set; }

		/// <summary>
		/// 下载最大记录数
		/// </summary>
		public int MaxDownloadCount { get; set; }

		/// <summary>
		/// 保存在线用户编号的cookie名
		/// </summary>
		public string OnlineIDCookieName { get; set; }

		/// <summary>
		/// 文件类型和导出记录数设置<文件类型,导出记录数>
		/// </summary>
		public SerializableDictionary<int, int> ExportRowLimit { get; set; }

		/// <summary>
		/// 下载任务目录
		/// </summary>
		public string DownloadTaskUrl { get; set; }

		/// <summary>
		/// 公告下载临时文件目录
		/// </summary>
		public string AnnaDownloadTempUrl { get; set; }

		/// <summary>
		/// CSMARService Windows Service Host 物理路径
		/// </summary>
		public string CSMARServiceWSPath { get; set; }

        /// <summary>
        /// 试用账号下载限制
        /// </summary>
        public int TryoutAcctMaxDownCount { get; set; }

        /// <summary>
        /// 用户反馈上传的附件在服务器上存放路径
        /// </summary>
        public string AccessoryPath { get; set; }
	}
}
